home *** CD-ROM | disk | FTP | other *** search
- /*{{{}}}*/
- /*{{{ bits per character = 8*/
- #define BITS_P_CHAR 8
- #define BITS_P_SET_PAKET BITS_P_CHAR/* needs to be a power of 2! */
- /*}}} */
- #include <h/token.h>
- #include <h/defaults.h>
- /*{{{ char-sets*/
- #define SET_LG ((1<<BITS_P_CHAR)/BITS_P_SET_PAKET)
- typedef unsigned char SetField[SET_LG];
-
- #if defined(SET_C) || defined(I_SET_C)
- typedef enum
- { add_new_set= 1,
- first_user_set= 0,
- alpha_set= -1,
- upper_set= -2,
- lower_set= -3,
- digit_set= -4,
- alnum_set= -5,
- blank_set= -6,
- xdigi_set= -7,
- cntrl_set= -8,
- punct_set= -9,
- print_set= -10,
- space_set= -11,
- graph_set= -12,
- undefined_set= -13
- } SetId;
- #endif
- /*}}} */
- /*{{{ standard-marks*/
- #define FOLD_TAG_LENGTH 3
- #define PSEUDO_MARK " "
- #define LINE_STANDARD "..."
- #define BEGIN_STANDARD "{{{"
- #define FILE_STANDARD ":::"
- #define END_STANDARD "}}}"
- /*}}} */
- /*{{{ compressed KEY structure and access*/
- #if defined(INIT_C) || defined (KEYTAB_C) || defined(VIEW_MAIN_C)
- /*{{{ KEY*/
- typedef struct
- { TOKEN code;
- unsigned char key;
- unsigned char flags;
- } KEY;
- # define NOT_USED 0
- # define NEXT_USED 1
- # define LEVEL_USED 2
- # define MAGIC_KEY 4
- # define FAR_NEXT 8
- /*}}} */
- /*{{{ key_level_ptr*/
- # define key_level_ptr(x) \
- (((x) && (x)->flags&LEVEL_USED) \
- ? ((x)+(x)->code) \
- : (KEY*)0)
- /*}}} */
- /*{{{ key_next_ptr*/
- # define key_next_ptr(x) \
- ((x) && ((x)->flags&NEXT_USED) \
- ? ((x)+1) \
- : (KEY*)0)
- /*}}} */
- /*{{{ key_far_next*/
- # define key_far_next(x) ((x)&&((x)->flags&FAR_NEXT))
- /*}}} */
- /*{{{ key_match*/
- # define key_match(x,c) ((x) && ((x)->flags&MAGIC_KEY || (x)->key==(c)))
- /*}}} */
- /*{{{ key_code*/
- # define key_code(x) ((!(x) || (x)->flags&LEVEL_USED)?0:((x)->code))
- /*}}} */
- /*{{{ set_key_data*/
- # define set_key_data(p,f) \
- ((p)->code=rc_get_w(f),(p)->key=rc_get_c(f),(p)->flags=rc_get_c(f))
- /*}}} */
- /*{{{ put_key_data*/
- # define put_key_data(p,f) \
- (rc_put_w((p)->code,(f)),rc_put_c((p)->key,(f)),rc_put_c((p)->flags,(f)))
- /*}}} */
- #endif
- /*}}} */
- /*{{{ histories*/
- typedef enum
- { unknown_history=0,
- default_history,
- no_history,
- misc_history,
- file_history,
- shell_history,
- search_history,
- replace_history,
- error_history,
- arg_history,
- match_history,
- nomatch_history,
- user_history
- } histories;
- /*}}} */
- /*{{{ rc-constants*/
- #ifdef BIND_CONST
- # undef BIND_CONST
-
- /*{{{ indices*/
- typedef enum
- {
- /*{{{ sizes*/
- i_m_count,
- i_v_count,
- i_k_count,
- /*}}} */
- /*{{{ vars*/
- i_v_cur_lev,
- i_v_scr_h,
- i_v_off_h,
- i_v_scr_w,
- i_v_off_w,
- i_v_ocl_arg,
- i_v_file_no,
- i_v_us_buff,
- i_v_cu_buff,
- i_v_cu_b_id,
- i_v_m_edit,
- i_v_mod_beh,
- i_v_key_count,
- i_v_kill_count,
- i_v_move_count,
- i_v_path,
- i_v_m_x,
- i_v_m_y,
- i_v_m_gy,
- i_v_m_but,
- i_v_m_buff,
- i_v_m_out,
- i_v_dired,
- i_v_force_sh,
- /*}}} */
- /*{{{ switches*/
- i_v_notitle,
- i_arg_list,
- /*}}} */
- /*{{{ specials*/
- i_general_abort_key,
- i_comma,
- i_lineend,
- i_linestart,
- /*}}} */
- /*{{{ hooks*/
- i_auto_macro,
- i_abort_macro,
- i_pin_macro,
- i_pout_macro,
- i_knb_macro,
- i_view_macro,
- i_buff_macro,
- i_quit_macro,
- i_usr1_macro,
- i_usr2_macro,
- i_alarm_macro,
- /*}}} */
- RCC_SIZE
- } b_c_offset;
- /*}}} */
- /*{{{ defines for const access*/
- /*{{{ sizes*/
- # define mac_count (bind_const[i_m_count])
- # define var_count (bind_const[i_v_count])
- # define ktb_count (bind_const[i_k_count])
- /*}}} */
- /*{{{ vars*/
- # define var_cur_lev (bind_const[i_v_cur_lev])
- # define var_scr_h (bind_const[i_v_scr_h])
- # define var_off_h (bind_const[i_v_off_h])
- # define var_scr_w (bind_const[i_v_scr_w])
- # define var_off_w (bind_const[i_v_off_w])
- # define var_ocl_arg (bind_const[i_v_ocl_arg])
- # define var_file_no (bind_const[i_v_file_no])
- # define var_us_buff (bind_const[i_v_us_buff])
- # define var_cu_buff (bind_const[i_v_cu_buff])
- # define var_cu_b_id (bind_const[i_v_cu_b_id])
- # define var_m_edit (bind_const[i_v_m_edit])
- # define var_mod_beh (bind_const[i_v_mod_beh])
- # define var_key_count (bind_const[i_v_key_count])
- # define var_kill_count (bind_const[i_v_kill_count])
- # define var_move_count (bind_const[i_v_move_count])
- # define var_path (bind_const[i_v_path])
- # define var_m_x (bind_const[i_v_m_x])
- # define var_m_y (bind_const[i_v_m_y])
- # define var_m_gy (bind_const[i_v_m_gy])
- # define var_m_but (bind_const[i_v_m_but])
- # define var_m_buff (bind_const[i_v_m_buff])
- # define var_m_out (bind_const[i_v_m_out])
- # define var_dired (bind_const[i_v_dired])
- # define var_force_sh (bind_const[i_v_force_sh])
- /*}}} */
- /*{{{ switches*/
- # define var_notitle (bind_const[i_v_notitle])
- # define arg_list (bind_const[i_arg_list])
- /*}}} */
- /*{{{ specials*/
- # define general_abort_key (bind_const[i_general_abort_key])
- # define comma (bind_const[i_comma])
- # define eoln_str (bind_const[i_lineend])
- # define soln_str (bind_const[i_linestart])
- /*}}} */
- /*{{{ hooks*/
- # define auto_macro (bind_const[i_auto_macro])
- # define abort_macro (bind_const[i_abort_macro])
- # define pin_macro (bind_const[i_pin_macro])
- # define pout_macro (bind_const[i_pout_macro])
- # define knb_macro (bind_const[i_knb_macro])
- # define view_macro (bind_const[i_view_macro])
- # define buff_macro (bind_const[i_buff_macro])
- # define squit_macro (bind_const[i_quit_macro])
- # define susr1_macro (bind_const[i_usr1_macro])
- # define susr2_macro (bind_const[i_usr2_macro])
- # define salarm_macro (bind_const[i_alarm_macro])
- /*}}} */
- /*}}} */
- #endif
- /*}}} */
-